package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CategoryMapper {
    /**
     * 添加一个药品的组合
     * @param category 药品id
     */
    @AutoFill(OperationType.INSERT)
    void addCategory(Category category);

    /**
     * 获取到组合信息
     * @param categoryId 组合id
     * @return
     */
    @Select("select * from category where id=#{categoryId}")
    Category getCategoryById(Long categoryId);
}
